class Login:
    def __init__(self,name,password,yanzhengma):
        self.name = name
        self.password = password
        self.yanzhengma = yanzhengma
    def login(self):
        if self.password == "8888" and self.yanzhengma == "0000" and self.name == "xiaoming":
            print("success")
        else:
            print("fail")
    def __str__(self):
        return f"当前输入的用户名{self.name}，密码{self.password},验证码{self.yanzhengma}"

login = Login("xiaoming","8888","xiaoming")
print(login)
login.login()
login = Login("xiaoming","8888","0000")
print(login)
login.login()